package com.xc.ezplan.admin.vo;

import java.util.List;
import java.util.Set;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import com.alibaba.fastjson.annotation.JSONField;

import com.xc.ezplan.admin.entity.AdminDept;
import com.xc.ezplan.admin.entity.AdminRole;
import com.xc.ezplan.core.base.BaseVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author lixingchen
 * @date 2022/11/20
 * @description 后台部门VO
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class AdminDeptVo extends BaseVo {

    @ApiModelProperty(value = "部门ID", hidden = true)
    private Long id;

    @JSONField(serialize = false)
    @ApiModelProperty(value = "角色")
    private Set<AdminRole> roles;

    @NotNull
    @ApiModelProperty(value = "排序")
    private Integer deptSort;

    @NotBlank
    @ApiModelProperty(value = "部门名称")
    private String name;

    @ApiModelProperty(value = "是否启用")
    private Boolean enabled;

    @ApiModelProperty(value = "上级部门")
    private Long pid;

    @ApiModelProperty(value = "所有部门")
    private List<AdminDept> deptList;
}